<?php

/**
 *
 *  创建人: xufei
 *  创建时间: [2014-7-8 22:33:47]
 *
 */
class DebugTest{

    function a(){
        $this->b();
    }

    function b(){
        $this->c();
    }

    function c(){
        echo "debug_backtrace result:";
        var_dump(debug_backtrace());
        echo "debug_print_backtrace result:";
        debug_print_backtrace();
    }


    function traceTest(){
        $this->a();
    }

    function outputTest(){
        $a = array("1",2,"3",true,5=>array("1",2,'a',true,'this is a test',"this is hello"));
        echo "var_dump result:";
        var_dump($a);
        echo "var_export result:";
        var_export($a);
        echo "print_r result:";
        print_r($a);
    }

    function otherTest(){
        $args = func_get_args();
        echo "args :";
        var_dump($args);
        echo "getincludefiles :";
        print_r(get_included_files());
    }


    function main(){
        $this->traceTest();
        $this->outputTest();
        $this->otherTest(array("1",2,"333"),12);
    }

}

$test = new DebugTest();
$test->main();

?>
